import router from "@/router";
import { Shuffle } from "@icon-park/vue-next";
import { useVModel } from "@vueuse/core";
import { defineComponent, reactive, ref, watch,onMounted } from "vue";
import "../assets/less/global.less";
import xiu from './xiu';


export default defineComponent({
  components:{
      xiu,
  },
  setup() {
    // const handleScroll = () => {
    //   console.log(document.documentElement.scrollTop);
    // };
    // const scroll = window.addEventListener("scroll", handleScroll);
    const tiaozhuan = () => {
      router.push("./antdesgin");
    };
    // onMounted(()=>{
    //     // zi.a();
    // })
    
    const dataAll={
      date:ref(2),
      Add:()=>{
        // console.log("123123131313231123",dataAll.date.value++);
        dataAll.date.value++;
      }
    }

    
      // const shu2 = useVModel()
    // const shu = useVModel(dataAll.date.value,"value");


    return () => (
      <div id="home">
        <div class="h-20 border border-tp bg-tp">
          <div class="h-10 bg-red-900 w-2/3 mx-auto my-10"></div>
        </div>
        <div class="h-15 border-gray-300 bg-tw sticky top-0 z-10">
          <div class="h-20 max-w-5xl mx-auto flex flex-wrap justify-between items-center">
            <div class="text-xl font-normal not-italic text-center mx-auto">
              这里是导航栏
            </div>
          </div>
        </div>
        <div class="mx-auto bg-wuyi bg-no-repeat bg-center max-w-5xl h-1/6 bg-contain bg-fixed"></div>
        <div class="mx-auto bg-wuer bg-no-repeat bg-center max-w-5xl h-1/6 bg-contain bg-fixed"></div>
        <button class="border w-40 h-10 mx-auto" onClick={() => tiaozhuan()}>
          跳转路由
        </button>
        {/* <xiu zi={zi} ref={zi.a} /> */}
        {dataAll.date.value}
        <xiu zi={dataAll} onFinsh={dataAll.Add} />

      </div>
    );
  },
});
